package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import com.example.myapplication.Base.BaseActivity;
import com.example.myapplication.View.BroadCastActivity;
import com.example.myapplication.View.DrawLayoutActivity;
import com.example.myapplication.View.HttpConnectActivity;
import com.example.myapplication.View.LoginActivity;
import com.example.myapplication.View.MapActivity;
import com.example.myapplication.View.MessageTest;
import com.example.myapplication.View.NewsTitleActivity;
import com.example.myapplication.View.NotificationActivity;
import com.example.myapplication.View.PermissionActivity;
import com.example.myapplication.View.SaveDataActivity;


public class MainActivity extends BaseActivity {

    private static final String TAG = "mainactivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button button = (Button) findViewById(R.id.button1);
        Button button2 = (Button) findViewById(R.id.button2);
        Button button3 = (Button) findViewById(R.id.button3);
        Button button4 = (Button) findViewById(R.id.login_button);
        button.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent intent = new Intent(MainActivity.this, MessageTest.class);
                Log.d(TAG, "onClick: button1");
                startActivity(intent);
            }
        });
        button2.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent intent = new Intent(MainActivity.this, NewsTitleActivity.class);
                Log.d(TAG, "onClick: button2");
                startActivity(intent);
            }
        });
        button3.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent intent = new Intent(MainActivity.this, BroadCastActivity.class);
                startActivity(intent);
            }
        });
        button4.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent intent = new Intent(MainActivity.this, LoginActivity.class);
                startActivity(intent);
            }
        });
        Button button5 = (Button) findViewById(R.id.save_button);
        button5.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent intent = new Intent(MainActivity.this, SaveDataActivity.class);
                startActivity(intent);
            }
        });
        Button button6 = (Button)findViewById(R.id.permission_button);
        button6.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent intent = new Intent(MainActivity.this, PermissionActivity.class);
                startActivity(intent);
            }
        });
        Button button7 = (Button)findViewById(R.id.system_function);
        button7.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent intent = new Intent(MainActivity.this, NotificationActivity.class);
                startActivity(intent);
            }
        });
        Button button8 = (Button)findViewById(R.id.http_connect);
        button8.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent intent = new Intent(MainActivity.this, HttpConnectActivity.class);
                startActivity(intent);
            }
        });
        Button button9 = (Button)findViewById(R.id.show_map);
        button9.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent intent = new Intent(MainActivity.this, MapActivity.class);
                startActivity(intent);
            }
        });
        Button button10 = (Button)findViewById(R.id.draw_layout);
        button10.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, DrawLayoutActivity.class);
                startActivity(intent);
            }
        });
    }
}